/**
 * Order
 */

import request from '@/utils/request'

export function resetCommission(data) {
  return request({
    url: '/api/uni/order/order/reset-commission',
    method: 'post',
    data
  })
}

// list
export function list(data) {
  return request({
    url: '/api/uni/order/order/list',
    method: 'post',
    data
  })
}

// view
export function view(data) {
  return request({
    url: '/api/uni/order/order/view',
    method: 'post',
    data
  })
}

export function cancel(data) {
  return request({
    url: '/api/uni/order/order/cancel',
    method: 'post',
    data
  })
}

// statusList
export function statusList(data) {
  return request({
    url: '/api/uni/order/order/status-list',
    method: 'post',
    data
  })
}

// expressStatusList
export function expressStatusList(data) {
  return request({
    url: '/api/uni/order/order/express-status-list',
    method: 'post',
    data
  })
}

// --------------------------------------------------------------------

// save express
export function saveExpress(data) {
  return request({
    url: '/api/uni/order/order/save-express',
    method: 'post',
    data
  })
}

// --------------------------------------------------------------------

// group list
export function groupList(data) {
  return request({
    url: '/api/uni/order/group/list',
    method: 'post',
    data
  })
}

// group view
export function groupView(data) {
  return request({
    url: '/api/uni/order/group/view',
    method: 'post',
    data
  })
}

// --------------------------------------------------------------------

// offline
export function offline(data) {
  return request({
    url: '/api/uni/order/order/offline-ok',
    method: 'post',
    data
  })
}

// refund
export function refund(data) {
  return request({
    url: '/api/uni/order/order/refund',
    method: 'post',
    data
  })
}

// 设置件数
export function changePrint(data) {
  return request({
    url: '/api/uni/order/order/change-print',
    method: 'post',
    data
  })
}

export function changeRemark(data) {
  return request({
    url: '/api/uni/order/order/change-remark',
    method: 'post',
    data
  })
}

// 处理打印二维码
export function printCode(data) {
  return request({
    url: '/api/uni/order/order/print-code',
    method: 'post',
    data
  })
}

export function printProduct(data) {
  return request({
    url: '/api/uni/order/order/print-product',
    method: 'post',
    data
  })
}

export function p1(data) {
  return request({
    url: '/api/uni/order/order/p1',
    method: 'post',
    data
  })
}

export function p2(data) {
  return request({
    url: '/api/uni/order/order/p2',
    method: 'post',
    data
  })
}

// --------------------------------------------------------------------

// 修改
export function editItem(data) {
  return request({
    url: '/api/uni/order/order/edit-item',
    method: 'post',
    data
  })
}

export function editDelete(data) {
  return request({
    url: '/api/uni/order/order/edit-delete',
    method: 'post',
    data
  })
}

export function editSave(data) {
  return request({
    url: '/api/uni/order/order/edit-save',
    method: 'post',
    data
  })
}
